package com.haiqiu.tools.auth.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author HaiQiu
 * @since 2023/3/16
 */
@Configuration
@ConfigurationProperties(prefix = "auth.server")
public class TokenConfig {

    /**
     * 自定义token名称
     */
    private String tokenName = "Authorization";

    /**
     * 自定义token前缀
     */
    private String bearer = "bearer";

    /**
     * 自定义token过期时间
     */
    private Long expiresTime = 36000L;

    /**
     * token加密密钥
     */
    private String secret = "haiqiu_secret_by_com.gitee.haioa";

    public String getTokenName() {
        return tokenName;
    }

    public void setTokenName(String tokenName) {
        this.tokenName = tokenName;
    }

    public String getBearer() {
        return bearer;
    }

    public void setBearer(String bearer) {
        this.bearer = bearer;
    }

    public Long getExpiresTime() {
        return expiresTime;
    }

    public void setExpiresTime(Long expiresTime) {
        this.expiresTime = expiresTime;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }
}
